home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Toolbox / EditTextCdev / EditCdev.r < prev    next >
Encoding:
Text File  |  1994-11-18  |  3.3 KB  |  139 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Macintosh Developer Technical Support
  4. #
  5. #    EditText Sample Control Panel Device
  6. #
  7. #    EditCdev
  8. #
  9. #    EditCdev.r    -    Rez Source
  10. #
  11. #    Copyright © 1988 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:    1.00                8/88
  15. #                1.10                6/92
  16. #
  17. #    Components:    EditCdev.p            August 1, 1988
  18. #                EditCdev.c            August 1, 1988
  19. #                EditCdev.r            August 1, 1988
  20. #                PEditCdev.make        August 1, 1988
  21. #                CEditCdev.make        August 1, 1988
  22. #                TCEditCdev.π        June 12, 1992
  23. #                TCEditCdev.π.rsrc    June 12, 1992
  24. #
  25. #    EditCdev is a sample Control Panel device (cdev) that 
  26. #    demonstrates the usage of the edit-related messages.  
  27. #    EditCdev demonstrates how to implement an editText item
  28. #    in a Control Panel Device.  It utilizes the new undo, cut, copy,
  29. #    paste, and delete messages that are sent to cdevs in
  30. #    response to user menu selections.
  31. #
  32. #    It is comprised of two editText items that can be edited 
  33. #    and moved between via the mouse or tab key.
  34. #
  35. ------------------------------------------------------------------------------*/
  36.  
  37.  
  38. #include "Types.r"
  39. #include "SysTypes.r"
  40.  
  41. type 'hack' as 'STR ';
  42.  
  43. resource 'vers' (1) {
  44.     0x01, 0x00, release, 0x00,
  45.     verUS,
  46.     "1.00",
  47.     "1.00, Copyright © 1988 Apple Computer, Inc."
  48. };
  49.  
  50. type 'nrct' {
  51.     integer = $$CountOf(RectArray);
  52.     array RectArray { rect; };
  53. };
  54.  
  55. type 'mach' {
  56.     unsigned hex integer;    /* Softmask */
  57.     unsigned hex integer;    /* Hardmask */
  58. };
  59.  
  60. resource 'hack' (0, purgeable) {
  61.     "Control Panel Device, INIT and CODE by Macintosh Developer Technical Support"
  62. };
  63.  
  64. resource 'BNDL' (-4064, purgeable) {
  65.     'hack', 0,
  66.     {    'ICN#', {0, -4064},
  67.         'FREF', {0, -4064}
  68.     }
  69. };
  70.  
  71. resource 'ICN#' (-4064, purgeable) {
  72.     { /* array: 2 elements */
  73.         /* [1] */
  74.         $"00 00 00 00 00 00 3F E0 00 00 48 10 00 00 44 10"
  75.         $"00 01 83 10 00 02 01 90 00 04 01 90 00 04 01 90"
  76.         $"00 04 01 90 00 04 03 90 00 04 02 90 00 04 02 90"
  77.         $"00 08 02 90 00 08 02 90 00 10 06 90 00 20 0C 90"
  78.         $"03 C0 18 90 04 00 3F 10 0F FF C0 10 08 00 00 10"
  79.         $"08 00 00 10 08 00 00 10 08 00 FF 10 08 00 00 10"
  80.         $"08 00 00 10 08 00 00 10 08 00 00 10 07 FF FF E0"
  81.         $"04 00 00 20 04 00 00 20 04 00 00 20 07 FF FF E0",
  82.         /* [2] */
  83.         $"00 00 00 00 00 00 3F E0 00 00 7F F0 00 00 7F F0"
  84.         $"00 01 FF F0 00 03 FF F0 00 07 FF F0 00 07 FF F0"
  85.         $"00 07 FF F0 00 07 FF F0 00 07 FF F0 00 07 FF F0"
  86.         $"00 0F FF F0 00 0F FF F0 00 1F FF F0 00 3F FF F0"
  87.         $"03 FF FF F0 07 FF FF F0 0F FF FF F0 0F FF FF F0"
  88.         $"0F FF FF F0 0F FF FF F0 0F FF FF F0 0F FF FF F0"
  89.         $"0F FF FF F0 0F FF FF F0 0F FF FF F0 07 FF FF E0"
  90.         $"07 FF FF E0 07 FF FF E0 07 FF FF E0 07 FF FF E0"
  91.     }
  92. };
  93.  
  94. resource 'DITL' (-4064) {
  95.     { /* array DITLarray: 1 elements */
  96.         /* [1] */
  97.         {60, 105, 76, 270},
  98.         EditText {
  99.             enabled, ""
  100.         };
  101.         /* [2] */
  102.         {85, 105, 101, 270},
  103.         EditText {
  104.             enabled, ""
  105.         };
  106.         /* [3] */
  107.         {15, 105, 50, 280},
  108.         StaticText {
  109.             disabled, "Apple Macintosh Developer Technical Support TextEdit Control Panel Device Example © 1988"
  110.         };
  111.         /* [4] */
  112.         {60, 278, 76, 320},
  113.         StaticText {
  114.             disabled, "0"
  115.         };
  116.         /* [5] */
  117.         {85, 278, 101, 320},
  118.         StaticText {
  119.             disabled, "0"
  120.         }
  121.     }
  122. };
  123.  
  124. resource 'FREF' (-4064, purgeable) {
  125.     'cdev', 0, ""
  126. };
  127.  
  128. resource 'nrct' (-4064, purgeable) {
  129.     {    /* array RectArray: 1 elements */
  130.         /* [1] */
  131.         {-1, 87, 120, 322}
  132.     }
  133. };
  134.  
  135. resource 'mach' (-4064, purgeable) {
  136.     0xFFFF,
  137.     0
  138. };
  139.